
import { Action } from '@ngrx/store';

import { TreeItem } from '../../components';

export enum ProfessionalActionTypes {
    LOAD_PROFESSIONAL = '[Professional] Load Professional',
    LOAD_PROFESSIONAL_FAIL = '[Professional] Load Professional Fail',
    LOAD_PROFESSIONAL_SUCCESS = '[Professional] Load Professional Success'
}

export class LoadProfessional implements Action {
    readonly type = ProfessionalActionTypes.LOAD_PROFESSIONAL;
}

export class LoadProfessionalFail implements Action {
    readonly type = ProfessionalActionTypes.LOAD_PROFESSIONAL_FAIL;
    constructor(public payload: any) {}
}

export class LoadProfessionalSuccess implements Action {
    readonly type = ProfessionalActionTypes.LOAD_PROFESSIONAL_SUCCESS;
    constructor(public payload: TreeItem[]) {}
}

export type ProfessionalAction
    = LoadProfessional
    | LoadProfessionalFail
    | LoadProfessionalSuccess;